import axios from '@/utils/axios'
import moment from "moment";


/*登录*/
export function login(params) {
  return axios({
    url: '/Index/login',
    method: 'post',
    data: params
  })
}

/*获取图形验证码*/
export function getCode(params) {
  return axios({
    url: '/Index/getCaptchaCode',
    method: 'post',
    data: params
  })
}

/*权限列表（侧边栏权限和按钮权限）*/
export function getPermission(params) {
  return axios({
    url: '/Index/getPermission',
    method: 'post',
    data: params
  })
}

/*账号列表*/
export function getAdmintorList(params) {
  return axios({
    url: '/adminAuth/adminList',
    method: 'post',
    data: params
  })
}

/*角色列表*/
export function getRoleList(params) {
  return axios({
    url: '/adminAuth/getRoleList',
    method: 'post',
    data: params
  })
}

//上传图片
export function publicUploadFile(params) {
  return axios({
    url: '/public/uploadFile',
    method: 'post',
    data: params
  })
}

//获取三级单元列表
export function getThirdUnitList() {
  return axios({
    url: '/ThirdUnit/list',
    method: 'post',
  })
}

//获取对应的四级单元列表
export function getFourthUnitList(params) {
  return axios({
    url: '/FourthUnit/list',
    method: 'post',
    data: params
  })
}

//获取对应的人员列表
export function getEmployeeList(params) {
  return axios({
    url: '/employee/list',
    method: 'post',
    data: params
  })
}

//获取岗位分页
export function getPositionPage(params) {
  return axios({
    url: '/Position/page',
    method: 'get',
    data: params
  })
}

//新增岗位
export function addPosition(params) {
  return axios({
    url: '/Position/add',
    method: 'post',
    data: params
  })
}

//获取评分规则列表
export function getScoreRuleList(params) {
  return axios({
    url: '/ScoreRule/list',
    method: 'post',
    data: params
  })
}

//获取评分规则列表
export function getPositionOne(params) {
  return axios({
    url: '/Position/getOne',
    method: 'post',
    data: params
  })
}

//获取评分规则列表
export function getBackList(params) {
  return axios({
    url: '/ResultThirdExamine/backList',
    method: 'post',
    data: params
  })
}

//新增评分规则
export function addScoreRule(params) {
  return axios({
    url: '/ScoreRule/add',
    method: 'post',
    data: params
  })
}

//获取四级CEO
export function getFourthCeoList(params) {
  return axios({
    url: '/FourthLevelCeo/list',
    method: 'post',
    data: params
  })
}

//获取计件规则列表
export function getPieceRuleList(params) {
  return axios({
    url: '/PieceRule/list',
    method: 'post',
    data: params
  })
}

//新增计件规则
export function addPieceRule(params) {
  return axios({
    url: '/PieceRule/add',
    method: 'post',
    data: params
  })
}

//获取绩效规则列表
export function getKpiRuleList(params) {
  return axios({
    url: '/KpiRule/list',
    method: 'post',
    data: params
  })
}

//获取地区系数列表
export function getRegionList(params) {
  return axios({
    url: '/RegionCoefficient/list',
    method: 'post',
    data: params
  })
}

//获取地区系数列表
export function addRegionList(params) {
  return axios({
    url: '/RegionCoefficient/add',
    method: 'post',
    data: params
  })
}

//获取底薪系数列表
export function getPositonCoefficientList(params) {
  return axios({
    url: '/PositionCoefficient/list',
    method: 'post',
    data: params
  })
}

//获取底薪系数列表
export function addPositonCoefficientList(params) {
  return axios({
    url: '/PositionCoefficient/add',
    method: 'post',
    data: params
  })
}

//获取骨干员工绩效系数列表
export function getCadreCoefficientList(params) {
  return axios({
    url: '/CadreCoefficient/list',
    method: 'post',
    data: params
  })
}

//获取骨干员工绩效系数列表
export function getWaitAssessorList(params) {
  return axios({
    url: '/EmployeePosition/list',
    method: 'post',
    data: params
  })
}

//发布
export function startFlow(params) {
  return axios({
    url: '/flow/startFlow',
    method: 'post',
    data: params
  })
}

//获取待审核列表
export function getWaitList(params) {
  return axios({
    url: 'WaitFill/list',
    method: 'post',
    data: params
  })
}

//申报评分
export function FinishScore(params) {
  return axios({
    url: '/EmpScore/add',
    method: 'post',
    data: params
  })
}

//申报计件
export function FinishPiece(params) {
  return axios({
    url: '/EmpPiece/add',
    method: 'post',
    data: params
  })
}

//kpi申报列表
export function GetKpiList(params) {
  return axios({
    url: '/KpiRule/EmpGetList',
    method: 'post',
    data: params
  })
}

//申报kpi
export function FinishKpi(params) {
  return axios({
    url: '/EmpKpi/match',
    method: 'post',
    data: params
  })
}

export function getFourthTask(params) {
  return axios({
    url: '/TaskView/getFourthTask',
    method: 'post',
    data: params
  })
}

export function getFourthTaskState(params) {
  return axios({
    url: '/TaskView/getEmpTask',
    method: 'post',
    data: params
  })
}

export function getResultScore(params) {
  return axios({
    url: '/ResultScore/list',
    method: 'post',
    data: params
  })
}

export function addResultScore(params) {
  return axios({
    url: '/ResultScore/add',
    method: 'post',
    data: params
  })
}

export function getResultPiece(params) {
  return axios({
    url: '/ResultPiece/list',
    method: 'post',
    data: params
  })
}

export function addResultPiece(params) {
  return axios({
    url: '/ResultPiece/add',
    method: 'post',
    data: params
  })
}

export function getResultKpi(params) {
  return axios({
    url: '/ResultKpi/list',
    method: 'post',
    data: params
  })
}

export function addResultKpi(params) {
  return axios({
    url: '/ResultKpi/add',
    method: 'post',
    data: params
  })
}

export function getThirdTask(params) {
  return axios({
    url: '/TaskView/getThirdTask',
    method: 'post',
    data: params
  })
}



export function addBack(params) {
  return axios({
    url: '/ResultThirdExamine/addBack',
    method: 'post',
    data: params
  })
}

export function getWageList(params) {
  return axios({
    url: '/CoefficientView/list',
    method: 'post',
    data: params
  })
}

export function addPositionInf(params) {
  return axios({
    url: '/PositionInf/add',
    method: 'post',
    data: params
  })
}

export function addOkrRule(params) {
  return axios({
    url: '/OkrRule/add',
    method: 'post',
    data: params
  })
}

export function getOkrRuleList(params) {
  return axios({
    url: '/OkrRule/list',
    method: 'post',
    data: params
  })
}

export function getBackFourthList(params) {
  return axios({
    url: '/TaskView/getBackFourthList',
    method: 'post',
    data: params
  })
}

export function getBackWaitState(params) {
  return axios({
    url: '/TaskView/getBackWaitState',
    method: 'post',
    data: params
  })
}

export function getBackScoreList(params) {
  return axios({
    url: '/ResultScore/BackScoreList',
    method: 'post',
    data: params
  })
}

export function addBackScore(params) {
  return axios({
    url: '/ResultScore/BackAdd',
    method: 'post',
    data: params
  })
}

export function getBackPieceList(params) {
  return axios({
    url: '/ResultPiece/BackPieceList',
    method: 'post',
    data: params
  })
}

export function addBackPiece(params) {
  return axios({
    url: '/ResultPiece/BackAdd',
    method: 'post',
    data: params
  })
}

export function getBackKpiList(params) {
  return axios({
    url: '/ResultKpi/BackKpiList',
    method: 'post',
    data: params
  })
}

export function addBackKpi(params) {
  return axios({
    url: '/ResultKpi/BackAdd',
    method: 'post',
    data: params
  })
}

export function getBackThirdList(params) {
  return axios({
    url: '/TaskView/getBackThirdList',
    method: 'post',
    data: params
  })
}

export function getRetrialState(params) {
  return axios({
    url: '/TaskView/getRetrialState',
    method: 'post',
    data: params
  })
}

export function addKpiRule(params) {
  return axios({
    url: '/KpiRule/add',
    method: 'post',
    data: params
  })
}

export function getPositionInformance(params) {
  return axios({
    url: '/Position/getInf',
    method: 'post',
    data: params
  })
}

export function secondAdd(params) {
  return axios({
    url: '/ResultSecondExamine/add',
    method: 'post',
    data: params
  })
}

export function secondList(params) {
  return axios({
    url: '/ResultSecondExamine/page',
    method: 'post',
    data: params
  })
}